.dock {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  position: absolute;
  overflow: hidden;
  display: flex;

  &-bar {
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    outline: none;
    zoom: 1;
  }

  &-ink-bar {
    position: absolute;
    box-sizing: border-box;
    margin-top: -3px;
    background-color: #108ee9;
    transform-origin: 0 0;
    width: 0;
    height: 0;
  }


  &-tab-btn-disabled {
    cursor: default;
    color: #ccc;
  }

  &-nav-animated {
    transition: transform 0.25s cubic-bezier(0.35, 0, 0.25, 1);
  }


  &-tab {
    box-sizing: border-box;
    position: relative;
    display: block;
    min-width: 30px;
    height: 30px;
    text-align: center;
    transition: color 0.25s cubic-bezier(0.35, 0, 0.25, 1);
    padding: 0;
    font-weight: 500;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    float: left;
    margin-right: 10px;
    background: #fafafd;
    outline: none;

    &.dragging {
      opacity: 0.3;
    }

    & > div {
      padding: 4px 14px;
      outline: none;
    }
  }

  &-tab:hover {
    color: #23c0fa;
  }

  &-tab-active,
  &-tab-active:hover {
    color: #108ee9;
    cursor: default;
    transform: translateZ(0);
  }

  &-tab-disabled {
    cursor: default;
    color: #ccc;
  }

  &-tab-disabled:hover {
    color: #ccc;
  }


  &-content-animated {
    transition: margin .3s;
  }

  &-bottom, &-top {
    & > .dock-nav .dock-ink-bar-animated,
    & > div > .dock-nav .dock-ink-bar-animated {
      transition: width .3s, left .3s, right .3s
    }
  }


  &-content-animated &-tabpane {
    flex-shrink: 0;
  }

  .no-flexbox &-content {
    transform: none !important;
    overflow: auto;
  }


  &-tabpane:not(&-tabpane-active) {
    animation-name: dock-fadeOut;
    animation-duration: 0.5s;
  }

  // delay the hiding
  @keyframes dock-fadeOut {
    from {
      height: 100%;
      visibility: visible;
    }
    to {
      height: 100%;
      visibility: visible;
    }
  }

  &-top {
    flex-direction: column;
  }

  &-top &-bar {
    flex: 0 0 auto;
    background: #fafafd;
    border-bottom: 1px solid #f3f3f3;
    padding-left: 8px;
  }


  &-top &-content-animated {
    flex-direction: row;
  }


  &-top &-tab-next {
    right: 2px;
  }

  &-top &-ink-bar {
    height: 2px;
    bottom: 0;
    left: 0;
  }

  &-tab-close-btn {
    position: absolute;
    cursor: pointer;
    font-family: 'Fredoka One', sans-serif;
    color: #bbb;
    right: -3px;
    font-size: 12px;
    width: 16px;
    text-align: center;
    top: 6px;
    opacity: 0.3;
    outline: none;
    transition: all 0.25s ease-in-out;

    &:before {
      content: "X";
    }
  }

  &-tab-close-btn:hover,
  &-tab-close-btn:focus {
    color: #666;
    transform: scale(1.1, 1.1);
  }

  &-tab:hover &-tab-close-btn,
  &-tab-close-btn:focus {
    opacity: 1;
    color: #999;
  }

  &-tab-hit-area {
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: -5px;
    right: -5px;
  }

  &-pane-cache {
    width: 100%;
    height: 100%;
  }

  &-content {
    display: flex;
    width: 100%;
    height: 100%;
  }

  &-content-holder {
    flex: auto;
  }
  &-top > &-content-holder {
    /* work around for the height issue in content holder*/
    height: 0;
  }

  &-content &-tabpane {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    outline: none;
    flex: none;
  }

  &-nav {
    display: flex;
    flex: none;
    position: relative;

    &-operations {
      display: flex;
    }

    &-more {
      height: 30px;
      border: none;
      background: transparent;
      cursor: pointer;
      position: relative;
      align-self: flex-end;

      &::after {
        position: absolute;
        z-index: 1;
        content: '';
        pointer-events: none;
        width: 30px;
        height: 30px;
        left: -30px;
        top: 0;
        box-shadow: inset -10px 0 8px -8px fade(#000, 8%);
      }
    }
  }


  &-nav-wrap {
    position: relative;
    display: flex;
    flex: auto;
    align-self: stretch;
    overflow: hidden;
    white-space: nowrap;
    transform: translate(0); // Fix chrome render bug
  }


  &-nav-list {
    display: flex;
    position: relative;
    transition: transform 0.3s;
  }

  &-extra-content {
    display: flex;
    height: 30px;
  }

  &-dropdown {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: rgba(0, 0, 0, .85);
    font-size: 14px;
    font-variant: tabular-nums;
    line-height: 1.5715;
    list-style: none;
    font-feature-settings: "tnum";
    position: absolute;
    top: -9999px;
    left: -9999px;
    z-index: 1050;
    display: block;

    &-hidden {
      display: none
    }

    &-menu {
      max-height: 200px;
      margin: 0;
      padding: 4px 0;
      overflow-x: hidden;
      overflow-y: auto;
      text-align: left;
      list-style-type: none;
      background-color: #fff;
      background-clip: padding-box;
      border-radius: 2px;
      outline: none;
      box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)
    }

    &-menu-item {
      min-width: 120px;
      margin: 0;
      padding: 5px 12px;
      overflow: hidden;
      color: rgba(0, 0, 0, .85);
      font-weight: 400;
      font-size: 14px;
      line-height: 22px;
      white-space: nowrap;
      text-overflow: ellipsis;
      cursor: pointer;
      transition: all .3s;
      position: relative;

      & .dock-tab-hit-area {
        left: 0;
        right: 0;
      }

      & .dock-tab-close-btn {
        right: 2px;
      }
    }

    &-menu-item:hover {
      background: #f5f5f5
    }

    &-menu-item-disabled, &-menu-item-disabled:hover {
      color: rgba(0, 0, 0, .25);
      background: 0 0;
      cursor: not-allowed
    }
  }
}

